package com.hflyeer.controller;


import com.hflyeer.pojo.ResponseBean;
import com.hflyeer.service.GradeService;
import com.hflyeer.util.ResponseUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 班级 前端控制器
 * </p>
 *
 * @author hflyeer
 * @since 2021-06-01
 */
@RestController
@RequestMapping("/grade")
@Api(tags = "学院")
public class GradeController {

    @Resource
    private GradeService gradeService;

    @ApiOperation(value = "获取所有班级")
    @RequestMapping(value = "/get",method = RequestMethod.GET)
    protected ResponseBean getAll(){
        List<Map<String, Object>> queryForGrades = gradeService.queryForGrades();
        return ResponseUtil.success(queryForGrades);
    }

}
